import java.util.ArrayList;
import java.util.List;

public class Solution119 {
    public List<Integer> getRow(int rowIndex) {
        List<Integer> list=new ArrayList<>();
        list.add(1);
        for (int i=1;i<=rowIndex;i++){
            long t=list.get(list.size()-1);
            list.add((int)(t*(rowIndex-i+1L)/i));
        }
        return list;
    }

    public static void main(String[] args) {
        System.out.println(new Solution119().getRow(3));
    }
}
